select ' INSERT INTO shift(SHIFTNAME,TIMESTART,TIMEEND,ADD1DAY,STATUS,MINSBREAK) VALUES (' 
+ '''' + ISNULL(SHIFTNAME,'')
+ ''',''' + isnull(convert(varchar(8),TIMESTART,108),'00:00:00')
+ ''',''' + isnull(convert(varchar(8),TIMEEND,108),'00:00:00')
+ ''',''' + ISNULL(ADD1DAY,'')
+ ''',''' + ISNULL(STATUS,'')
+ ''',' + ISNULL(str(MINSBREAK,4),'Null')
+ ')' from shift order by EMPSHIFTCODE

